package com.xpresso.utils.maps;

public class Coordinate {

	protected double latitude;
	protected double longitude;
	
	public Coordinate(){
		
	}
	
	public Coordinate(double longitude, double latitude){
		this.latitude = latitude;
		this.longitude = longitude;
	}
	
	public String toString(){
		return "long: " + this.longitude + " lat: " + this.latitude;
	}
	
	@Override
	public boolean equals(Object obj) {
		Coordinate c = (Coordinate)obj;
		if (c.getLatitude() == this.latitude && c.getLongitude() == this.longitude){
			return true;
		}
		return false;
	}

	public double getLatitude() {
		return latitude;
	}
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	public double getLongitude() {
		return longitude;
	}
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	public int getIntLongitude(){
		return Double.valueOf(Math.floor(this.longitude)).intValue();
	}
	public int getIntLatitude(){
		return Double.valueOf(Math.floor(this.latitude)).intValue();
	}
}
